package com.mazihao.emos.db.dao;

import com.mazihao.emos.db.pojo.TbMessage;
import com.mazihao.emos.db.pojo.TbMessageRef;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author mazihao
 */
@Mapper
public interface TbMessageRefDao {
    public void insert(TbMessageRef messageRef);

    public long searchUnreadCount(int userId);

    public long searchLastCount(int userId);

    public TbMessageRef searchMessageRefByMessageId(@Param("messageId") String messageId,@Param("userId") int userId);

    public long updateUnreadMessage(@Param("id") String id,@Param("userId") int userId);

    public long deleteMessageRefById(String id);

    public long deleteUserMessageRef(int userId);
}
